<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<div class="report-detection-result">
    <i [lv-icon]="detectionIcon"></i>
    <div class="no-data-label">
        <h1 class="aui-gutter-column-sm">{{detectionResultLabel}}</h1>
    </div>
    <div class="no-data-label">
        <p class="aui-text-help-sm aui-gutter-column-lg" *ngIf="!isEn">
            {{copyDataLabel}}{{'common_copy_data_label' | i18n }}{{detectionResultLabel}}
        </p>
        <p class="aui-text-help-sm aui-gutter-column-lg" *ngIf="isEn">
            {{copyDataLabel}} {{'common_copy_data_label' | i18n }} {{detectionResultLabel}}
        </p>
    </div>
</div>
<div class="report-detail aui-gutter-column-md">
    <ng-container *ngIf="!_isEmpty(reportLabel)">
        <span [innerHTML]="reportLabel"></span>
    </ng-container>
    <ng-container *ngIf="_isEmpty(reportLabel)">
        <div class="report-no-data aui-block">
            <lv-empty></lv-empty>
        </div>
    </ng-container>
</div>
<h3 class="aui-gutter-column-md">
    {{'common_basic_info_label' | i18n}}
</h3>
<lv-form [lvLabelColon]='false' class="aui-gutter-column-xl">
    <lv-form-column *ngFor='let column of formItems' lvWidth="50%">
        <lv-form-item *ngFor='let item of column'>
            <lv-form-label>
                {{item.label}}
                <i lv-icon="aui-icon-help" class="configform-constraint" *ngIf="!!item.help"
                    lv-tooltip="{{item.help}}"></i>
            </lv-form-label>
            <lv-form-control>
                <span lv-overflow>{{item.content | nil}}</span>
            </lv-form-control>
        </lv-form-item>
    </lv-form-column>
</lv-form>
<h3 class="aui-gutter-column-md">
    {{'explore_dep_report_file_count_change_chart_label' | i18n}}
</h3>
<div class="aui-gutter-column-xl">
    <aui-detection-trend-chart [seriesData]="seriesData" [isSnapshotReport]="true"></aui-detection-trend-chart>
</div>
<lv-group lvGutter='8px' class="aui-gutter-column-md">
    <h3>
        {{ (isProductStorage ? 'explore_suspicious_file_list_label' : 'explore_protect_object_list_label') | i18n }}
        <i lv-icon="aui-icon-help" *ngIf="isProductStorage"
            lv-tooltip="{{'explore_max_infected_file_label' | i18n:[10000]}}" lvTooltipPosition="rightTop"
            lvTooltipTheme="light" lvColorState='true'></i>
    </h3>
</lv-group>
<div class="file-list">
    <lv-pro-table #dataTable [config]="tableConfig" [data]="tableData"></lv-pro-table>
</div>

<ng-template #nameTpl let-item>
    <span lv-overflow class="aui-link" (click)="protectObjectDetail(item)">
        {{item.protectedObjName}}
    </span>
</ng-template>